import request from '@/router/axios';
import {downloadExcel} from '@/router/axios';
import {formatCondition} from '@/util/util';
//单条查询
export const queryBizApparchSystemFunction = (params) => {
  params.head.transCode = 'queryBizApparchSystemFunction';
  return request({
    url: '/biz/apparch/bizApparchSystemFunction/queryBizApparchSystemFunction',
    method: 'post',
    data: params
  })
}
//多条列表查询，支持条件查询
export const queryBizApparchSystemFunctionListPage = (params) => {
  params.head.transCode = 'queryBizApparchSystemFunctionListPage';
  return request({
    url: '/biz/apparch/bizApparchSystemFunction/queryBizApparchSystemFunctionListPage',
    method: 'post',
    data: params
  })
}
//新增单条记录
export const saveBizApparchSystemFunction = (params) => {
  params.head.transCode = 'saveBizApparchSystemFunction';
  return request({
    url: '/biz/apparch/bizApparchSystemFunction/saveBizApparchSystemFunction',
    method: 'post',
    data: params
  })
}
//新增多条记录
export const saveBizApparchSystemFunctionList = (params) => {
  params.head.transCode = 'saveBizApparchSystemFunctionList';
  return request({
    url: '/biz/apparch/bizApparchSystemFunction/saveBizApparchSystemFunctionList',
    method: 'post',
    data: params
  })
}
//新增或修改单条记录
export const saveOrUpdateBizApparchSystemFunction = (params) => {
  params.head.transCode = 'saveOrUpdateBizApparchSystemFunction';
  return request({
    url: '/biz/apparch/bizApparchSystemFunction/saveOrUpdateBizApparchSystemFunction',
    method: 'post',
    data: params
  })
}


//新增或修改单条记录
export const saveOrUpdateBizApparchSystemFunctionList = (params) => {
  params.head.transCode = 'saveOrUpdateBizApparchSystemFunctionList';
  return request({
    url: '/biz/apparch/bizApparchSystemFunction/saveOrUpdateBizApparchSystemFunctionList',
    method: 'post',
    data: params
  })
}

//修改单条记录
export const updateBizApparchSystemFunction = (params) => {
  params.head.transCode = 'updateBizApparchSystemFunction';
  return request({
    url: '/biz/apparch/bizApparchSystemFunction/updateBizApparchSystemFunction',
    method: 'post',
    data: params
  })
}

//删除单条记录
export const deleteBizApparchSystemFunction = (params) => {
  params.head.transCode = 'deleteBizApparchSystemFunction';
  return request({
    url: '/biz/apparch/bizApparchSystemFunction/deleteBizApparchSystemFunction',
    method: 'post',
    data: params
  })
}

//删除多条记录
export const deleteBizApparchSystemFunctionList = (params) => {
  params.head.transCode = 'deleteBizApparchSystemFunctionList';
  return request({
    url: '/biz/apparch/bizApparchSystemFunction/deleteBizApparchSystemFunctionList',
    method: 'post',
    data: params
  })
}
//导出excel
export const exportBizApparchSystemFunctionExcel = (params) => {
  downloadExcel({
    url: '/biz/apparch/bizApparchSystemFunction/excelDownload/exportBizApparchSystemFunctionExcel',
    method: 'get',
    data: 
    {
      tenantId: params.head.tenantId,
      orders:'',
      condition: formatCondition(params.body.sqlCondition)
    }
  })
}
